
 
 E v e n t :   " a t t r i b u t e C h a n g e " 
 
 
 
 D e s c r i p t i o n :   S e t s   a   h a n d l e r   t o   e x i c u t e   w h e n   t h e   s p e c i f i e d   a t t r i b u t e s   c h a n g e   o n   a   D O M   e l e m e n t . 
 
 
 
 R e t u r n s :   d o m E l e m e n t ,   o r   $ A   o b j e c t   i f   c h a i n e d . 
 
 
 
 N o t e :   T h i s   e v e n t   u t i l i z e s   t h e   M u t a t i o n   O b s e r v e r   A P I . 
 
 h t t p s : / / d e v e l o p e r . m o z i l l a . o r g / e n - U S / d o c s / W e b / A P I / M u t a t i o n O b s e r v e r 
 
 
 
 E x a m p l e : 
 
 
 
     / /   B i n d   a n   a t t r i b u t e   c h a n g e   h a n d l e r   t o   a   s p e c i f i e d   D O M   e l e m e n t . 
 
 
 
     $ A ( t a r g e t E l e m e n t ) . o n ( " a t t r i b u t e C h a n g e " ,   f u n c t i o n ( M u t a t i o n O b j e c t ,   t a r g e t E l e m e n t ,   a t t r i b u t e N a m e ,   a t t r i b u t e V a l u e ,   a t t r i b u t e P r i o r V a l u e ,   B o u n d O b j e c t O r D C ,   S a v e d D a t a )   { 
 
         / /   D o   s o m e t h i n g   w i t h   t a r g e t E l e m e n t . 
 
         / /   B o u n d O b j e c t O r D C   p o p u l a t e s   w h e n   t h e   t a r g e t E l e m e n t   i s   b o u n d   u s i n g   $ A . b i n d O b j e c t s ( ) ,   o r   i s   b o u n d   t o   a   D C   i n s t a n c e . 
 
         / /   S a v e d D a t a   p o p u l a t e s   w h e n   s a v e d   e v e n t   p a r a m e t e r s   a r e   s p e c i f i e d   u s i n g   t h e   $ A . o n   e v e n t   s y n t a x .   ( H e l p / $ A   A P I / D O M   E v e n t s / O n )   
 
     } , 
 
     { 
 
         a t t r i b u t e F i l t e r :   [ " A t t r i b u t e 1 N a m e " ,   " A t t r i b u t e 2 N a m e " ,   " E t c . " ] 
 
     } ) ; 
 
 